package com.example.lock.redission;

import org.redisson.api.RLock;


public class TestRedisson {


    public static void main(String[] args) throws InterruptedException {

        RedissonProperties redissonProperties = new RedissonProperties();

        RedissonLockUtil.initClient(redissonProperties);

        System.out.println("开始加锁。。。。。。");

        RLock myTestLock = RedissonLockUtil.lock("myTestLock",40);

        Thread.sleep(45000L);

        System.out.println("开始释放锁。。。。。。");
        RedissonLockUtil.unlock(myTestLock);

    }
}
